<template>
  <div>

    <!-- <Button type="primary" @click="jj('10433')">测试1</Button>
    <Button type="primary" @click="jj('10437')">测试2</Button>
    <Button type="primary" @click="jj('11159')">测试3</Button> -->

    <Card>
      <div :class=" $app.judgeData(userPower)?' ' :' visHidden ' ">
        <!-- 用户信息+充值 -->
        <UserSmall ref="UserSmall" :userPower="userPower" :companyAll="companyAll" @up_cAll="up_cAll"/>

        <!-- 我的资产购买 + 多账号管理 -->
        <template v-if="$app.judgeData(companyAll) && companyAll.state==2">
          <AccZc ref="AccZc" style="margin:30px 0;" :userPower="userPower" :companyAll="companyAll" />
          <template v-if="$app.judgeData(userPower) && userPower.is_admin">
            <!-- 是管理员才有这个权限增减的东西 -->
            <AccountZh ref="AccountZh" style="margin:30px 0;"/>
          </template>
        </template>
        <ZhAnQ ref="ZhAnQ"/>
      </div>
    </Card>
    
  </div>
</template>

<script>

import UserSmall from "./_service/userSmall";
import AccountZh from "./accountZh";
import ZhAnQ from "@$@/_service/zhAnQ";
import AccZc from "./accZc";
export default {
  name: "accountInfo",
  components: {
    UserSmall,
    AccountZh,
    ZhAnQ,
    AccZc
  },
  data() {
    let data = {
      companyAll:'',
      userPower:''
    };
    return data;
  },
  created() {
    $app.loading();
    this.up_cAll();
  },
  mounted() {},
  methods: {
    up_cAll(){
      $ajax.userInfo(resData=>{
        this.userPower=resData;
      });
      $ajax.pInfo(resData => {
        this.companyAll=resData;
      });
    },
    jj(order_id){
      this.$router.push({
        name:'patentDetails',
        query:{
          order_id
        }
      })
    }
  }
};
</script>

